package com.springcloud.configclient.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//替换IRULE 这里使用 RanddomRule
//SpringBoot的启动类要添加：@RibbonClient(name = "cloud-provider-payment",configuration = MyRule.class)
//当前的这个配置类不能放在启动类的包路径
@Configuration
public class MyRule {
    @Bean
    public IRule iRule() {
       return new RandomRule();

    }
}
